home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 2904 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  899 b 

  1. Path: fangz.com!not-for-mail
  2. From: shad@fangz.com (Shadow.King)
  3. Newsgroups: comp.lang.c++
  4. Subject: C++ timer
  5. Date: 20 Jan 1996 04:12:36 -0500
  6. Organization: fangz.com
  7. Message-ID: <4dqbm4$huk@fangz.com>
  8. NNTP-Posting-Host: fangz.com
  9. X-Newsreader: TIN [UNIX 1.3 BETA-950824-color PL0]
  10.  
  11. I'm fairly new to C++ and I was wondering if anyone out there had any 
  12. tips on creating a program that would run a specified function every so 
  13. often. something like a while loop with constant clock checks to see if 
  14. one second has passed. I want to be able to specify times a lot less than 
  15. one second though.. I was trying the clock() function and using a few 
  16. variables as a stop watch to mark start and end times and calculate tick 
  17. in between but I can't seem to come up with something that works right. 
  18. IF anyone could give me any tips or show some example code of something 
  19. similr I'd be much appreciated.
  20.